package zengqiang.day02

fun main(args: Array<String>) {
    val str="abcd"
    for (c in str) {
        println(c)
    }
    for ((index,c) in str.withIndex()) {
        println("下标$index  当前字符$c")
    }
    str.forEach {
        println(it)
    }
    str.forEachIndexed { index, c ->
        println("下标$index  当前字符$c")
    }

}